*"Do Political Finance Reforms Reduce Corruption?" Replication Code
*Updated 6/6/19
*Calla Hummel (corresponding author, chummel@miami.edu), John Gerring, and Thomas Burt
*Note: the replication data that goes with this code is labeled "PaperReplicationData7.0.dta"
*If you would like the replication data with the PRS alternative DV, email us for "PaperReplicationData7.0PRS.dta"

***Analyses and Figures in the Main Text***

***PCA***
pca campaigns_pubfin partyorg_pubfin majority_pubfin partyfin_onpaper campaignfin_onpaper, mineigen(1)
*replication data comes with this variable and its transformations in it, but to get it: 
*predict elcorrindex1
corr pubfin_add elcorrindex1
summarize pubfin_add

***Descriptive (note: Figure 1 and 2 graphs done in R; not perfectly reproduced here)***
tab pubfin_add if v2x_corrV8 != . & year == 1960
tab pubfin_add if v2x_corrV8 != . & year == 1970
tab pubfin_add if v2x_corrV8 != . & year == 1980
tab pubfin_add if v2x_corrV8 != . & year == 1990
tab pubfin_add if v2x_corrV8 != . & year == 2000
tab pubfin_add if v2x_corrV8 != . & year == 2010

***Case: Paraguay (note: Figure 3 graph done in R; not perfectly reproduced here)***
scatter v2x_corrV8 year if country_id == 189 & year > 1900
list country_name year v2x_corrV8 if country_id == 189 & year > 1980
mean v2x_corrV8 if year == 1996
list country_name v2x_corrV8 if year == 1996

***Paraguay Time Series***
*Bivariate
reg f5.v2x_corrV8 v2x_corrV8 pubfinindexstock1log if country_id == 189
*Sparse benchmark
reg f5.v2x_corrV8 v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln if country_id == 189
*Kitchen sink
reg f5.v2x_corrV8 v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 if country_id == 189

*Correlations between corruption measures (note that the other measures go in the opposite direction of v2x_corr)
*Note: PRS measure not included with public replication data because it is proprietary. Correlated with v2x_corr at .69 
corr v2x_corrV8 e_wbgi_cceV8
corr v2x_corrV8 e_ti_cpiV8
corr v2x_corrV8 Corruption_PRS 

***Regressions***
*Table 3: Main results
*Fixed effects bivariate
xtreg f5.v2x_corrV8 pubfinindexstock1log i.year, fe vce(cluster country_id)
*Fixed effects benchmark
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
*Fixed effects kitchen sink
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year, fe vce(cluster country_id)
*Random effects kitchen sink
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year, re vce(cluster country_id)

***RELOAD DATA AFTER THIS***
*GMM in Table 3
drop if year != 2010 & year != 2005 & year != 2000 & year != 1995 & year != 1990 & year != 1985 & year != 1980 & year != 1975 & year != 1970 & year != 1965 & year != 1960 & year != 1955 & year != 1950 & year != 1945 & year != 1940 & year != 1935 & year != 1930 & year != 1925 & year != 1920 & year != 1915 & year != 1910 & year != 1905 & year != 1900 
sort country_id year
by country_id: gen trend = _n
xtset country_id trend
*xtabond2 is an older command. Download it as a module by searching for it via Stata's command line.
xtabond2 f.v2x_corrV8 v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln year, gmm(pubfinindexstock1log, lag (3 5)) iv(year) robust artests(3)
***RELOAD DATA***

*Predicted Probabilities
xi: xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
quietly margins, at(pubfinindexstock1log=(0(1)6)) 
marginsplot, ytitle("Corruption Index", size(small)) xtitle("Political Finance Index stock (ln)", size(small)) ///
               ylabel(, labsize(small)) ///
               xlabel(, ///
			   labsize(small) angle(315)) ///
               recast(line) recastci(rline) scheme(tufte) title(, size(small))	               
*hypothetical case numbers: 0 is a predicted score of .4908. Every increase in the logged scale corresponds to a .0166
*reduction in corruption score. Increasing from 0 to 5 on the unlogged scale puts a country at 1.69 on the logged scale.
*and 1.69*.0166=.028 reduction, for .4628 predicted score. After 10 years, a country is at 66.92 on the unlogged scale,
*or 4.203 logged. 4.203*.0166=.0697, substracted from .4908=.4211.
*Countries with scores close to these
list country_name year v2x_corr if v2x_corr >= .49 & v2x_corr <= .495 & year>1980
list country_name year v2x_corr if v2x_corr >= .46 & v2x_corr <= .465 & year>1980
list country_name year v2x_corr if v2x_corr >= .42 & v2x_corr <= .425 & year>1980
 
*Disaggregated corruption
*Table 4
*Note: executive and public corruption are indices and go from least corrupt to most corrupt. 
*The other three are not and in the V-Dem data go from most corrupt to least corrupt. Thus, we've reversed the scale.
xtreg f5.v2x_execorrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f5.v2lgcrrptflip pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f5.v2x_pubcorrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f5.v2jucorrdcflip  pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
*placebo test
xtreg f5.v2mecorrptflip pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)

*Robustness Checks 
*Table 5
*Sparse benchmark, alternative measure.
xtreg f5.v2x_corrV8 v2elpubfinV8 cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
*Sparse benchmark, with donation disclosure variable
xtreg f5.v2x_corrV8 pubfinindexstock1log v2eldonateV8_stock_1900_1 cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
*Bivariate, cleaned estimate:
xtreg f5.v2x_corrV8 pubfinindexstock1log f5.v2elpubfinV8 i.year, fe vce(cluster country_id)


***Analyses and Figures in the Online Appendix***

*Table C2 Descriptive statistics
summarize v2x_corrV8
summarize pubfinindexstock1log
summarize v2elpubfinV8
summarize v2x_polyarchyV8
summarize Fariss_Maddison_gdppc_1990_ln
summarize Fariss_e_miurbani
summarize Fariss_gdp_growth
summarize v2eldonateV8
summarize v2x_elecregV8
summarize v2x_execorrV8
summarize v2lgcrrptflip
summarize v2x_pubcorrV8
summarize v2jucorrdcflip
summarize v2mecorrptflip
summarize v2mecenefmV8
summarize e_cow_exportsV8 
summarize e_cow_importsV8
summarize e_Total_Resources_Income_PCV8

*Table C3 Index descriptive statistics
summarize pubfinindexstock1log
summarize pubfinindexstock10log
summarize pubfin_add_stock_1900_1
summarize pubfin_add
summarize elcorrindex1
summarize partyfin_onpaper
summarize partyorg_pubfin
summarize campaignfin_onpaper
summarize campaigns_pubfin
summarize majority_pubfin 

*Figure C1 was produced in R and is not perfectly reproduced here. Similar information obtained through:
corr v2x_corrV8 pubfinindexstock1log v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln  Fariss_e_miurbani Fariss_gdp_growth v2x_elecregV8 v2eldonateV8 v2elpubfinV8

*Changes to main IV construction
*Public finance index, level, unlogged
xtreg f5.v2x_corrV8 pubfin_add i.year, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfin_add cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfin_add cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln  Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year, fe vce(cluster country_id)

*Public finance index, PCA
xtreg f5.v2x_corrV8 elcorrindex1 i.year, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 elcorrindex1 cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 elcorrindex1 cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln  Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year, fe vce(cluster country_id)

*Public finance index, stock, unlogged
xtreg f5.v2x_corrV8 pubfin_add_stock_1900_1 i.year, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfin_add_stock_1900_1 cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfin_add_stock_1900_1 cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln  Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year, fe vce(cluster country_id)

*Public finance index, stock, 10% depreciation
xtreg f5.v2x_corrV8 pubfinindexstock10log i.year, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfinindexstock10log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfinindexstock10log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln  Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year, fe vce(cluster country_id)

*Changes to estimator or sample 
*Random effects
xtreg f5.v2x_corrV8 pubfinindexstock1log i.year, re vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, re vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year, re vce(cluster country_id)

*1 year lag
xtreg f.v2x_corrV8 pubfinindexstock1log i.year, fe vce(cluster country_id)
xtreg f.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year, fe vce(cluster country_id)

*10 year lag
xtreg f10.v2x_corrV8 pubfinindexstock1log i.year, fe vce(cluster country_id)
xtreg f10.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f10.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year, fe vce(cluster country_id)

*Restrict sample to 1960+
xtreg f5.v2x_corrV8 pubfinindexstock1log i.year if year>1959, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year if year>1959, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year if year>1959, fe vce(cluster country_id)

*Interactions:
xtreg f5.v2x_corrV8 cc.pubfinindexstock1log##c.v2x_polyarchyV8 cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 cc.pubfinindexstock1log##c.Fariss_Maddison_gdppc_1990_ln cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_gdp_growth Fariss_e_miurbani i.v2x_elecregV8 i.year, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 cc.pubfinindexstock1log##c.Fariss_e_miurbani cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_gdp_growth i.v2x_elecregV8 i.year, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 cc.pubfinindexstock1log##c.Fariss_gdp_growth cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_e_miurbani i.v2x_elecregV8 i.year, fe vce(cluster country_id)

*Lagged DV
***RELOAD DATA AFTER THIS***
*Intervals for lagged DV (DO NOT SAVE DATA AFTER DOING THIS)
drop if year != 2010 & year != 2005 & year != 2000 & year != 1995 & year != 1990 & year != 1985 & year != 1980 & year != 1975 & year != 1970 & year != 1965 & year != 1960 & year != 1955 & year != 1950 & year != 1945 & year != 1940 & year != 1935 & year != 1930 & year != 1925 & year != 1920 & year != 1915 & year != 1910 & year != 1905 & year != 1900 
sort country_id year
by country_id: gen trend = _n
xtset country_id trend

xtreg f.v2x_corrV8 v2x_corrV8 pubfinindexstock1log i.year, fe vce(cluster country_id)
xtreg f.v2x_corrV8 v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f.v2x_corrV8 v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year, fe vce(cluster country_id)

***RELOAD DATA***

*Additional controls
*Natural resources
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln e_Total_Resources_Income_PCV8 i.year, fe vce(cluster country_id)
*Media censorship
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln v2mecenefmV8 i.year, fe vce(cluster country_id)
*COW import/export
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln e_cow_exportsV8 e_cow_importsV8 i.year, fe vce(cluster country_id)
*All together now
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_Total_Resources_Income_PC v2mecenefmV8 e_cow_exportsV8 e_cow_importsV8 i.year, fe vce(cluster country_id)

*Drop influential regions and countries
*Regions:
*Eastern Europe
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year if e_region_world_2V8 !=1, fe vce(cluster country_id)
*Latin America
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year if e_region_world_2V8 !=2, fe vce(cluster country_id)
*Western Europe and North America
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year if e_region_world_2V8 !=5, fe vce(cluster country_id)

*Countries:
***RELOAD DATA AFTER THIS***
*Check for outliers: Uruguay (102), Israel (169), and Finland (163)
hist pubfinindexstock1log
list country_id country_name year pubfinindexstock1log if pubfinindexstock1log > 5 & pubfinindexstock1log != .
*Uruguay (102), Israel (169), and Finland (163):
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year if country_id != 102, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year if country_id != 163, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year if country_id != 169, fe vce(cluster country_id)
*Also dropping Costa Rica and Germany because they are early adopters:
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year if country_id != 73, fe vce(cluster country_id)
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year if country_id != 77, fe vce(cluster country_id)
*All together now (DO NOT SAVE DATA AFTER DOING THIS)
drop if country_id == 73
drop if country_id == 77
drop if country_id == 102
drop if country_id == 163
drop if country_id == 169
xtreg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)

***RELOAD REPLICATION DATA***

*Pooled OLS
*bivariate model
reg f5.v2x_corrV8 pubfinindexstock1log , vce(cluster country_id)
*region and year dummies
reg f5.v2x_corrV8 pubfinindexstock1log i.e_regiongeo i.year, vce(cluster country_id)
*full specification
reg f5.v2x_corrV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln English_legal_origin lp_protmg80 WorldBank_pop_estimate_ln i.e_regiongeo i.year, vce(cluster country_id)

*Pooled OLS with TI data (note that the TI scale goes in the opposite direction of the VDem index) 
*bivariate model. 
reg f5.e_ti_cpiV8 pubfinindexstock1log, vce(cluster country_id)
*region and year dummies.
reg f5.e_ti_cpiV8 pubfinindexstock1log i.e_regiongeo i.year, vce(cluster country_id)
*full specification. 
reg f5.e_ti_cpiV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln English_legal_origin lp_protmg80 WorldBank_pop_estimate_ln i.e_regiongeo i.year, vce(cluster country_id)

*Pooled OLS with WB data (note that the WB data goes in the opposite direction of the VDem index) 
*bivariate model. 
reg f5.e_wbgi_cceV8 pubfinindexstock1log, vce(cluster country_id)
*region and year dummies.
reg f5.e_wbgi_cceV8 pubfinindexstock1log i.e_regiongeo i.year, vce(cluster country_id)
*full specification. 
reg f5.e_wbgi_cceV8 pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln English_legal_origin lp_protmg80 WorldBank_pop_estimate_ln i.e_regiongeo i.year, vce(cluster country_id)

*Judicial Corruption
xtreg f5.v2jucorrdcflip pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f5.v2jucorrdcflip pubfinindexstock1log v2x_jucon cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f5.v2jucorrdcflip pubfinindexstock1log v2juaccnt cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
xtreg f5.v2jucorrdcflip pubfinindexstock1log v2x_jucon v2juaccnt cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)

*VDem and PFSI
*Bivariate, cleaned estimate:
xtreg v2x_corrV8 l5.pubfinindexstock1log v2elpubfinV8 i.year, fe vce(cluster country_id)
*Polyarchy
xtreg f.v2x_corrV8 pubfinindexstock1log f5.v2elpubfinV8 v2x_polyarchyV8 i.year, fe vce(cluster country_id)
*GDP
xtreg f.v2x_corrV8 pubfinindexstock1log f5.v2elpubfinV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
*Polyarchy and GDP
xtreg f.v2x_corrV8 pubfinindexstock1log f5.v2elpubfinV8 v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
*Benchmark. p=.27
xtreg v2x_corrV8 l5.pubfinindexstock1log v2elpubfinV8 cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)

*Alternative DV: PRS ICRG
*NOTE: this variable is not in the public replication data because PRS data is proprietary.
*Bivariate, 1 year lag
xtreg f.Corruption_PRS pubfinindexstock1log i.year, fe vce(cluster country_id)
*Benchmark 1 year lag
xtreg f.Corruption_PRS pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
*Kitchen sink, 1 year lag
xtreg f.Corruption_PRS pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln Fariss_e_miurbani Fariss_gdp_growth i.v2x_elecregV8 i.year, fe vce(cluster country_id)
*Benchmark, five year lag: almost significant
xtreg f5.Corruption_PRS pubfinindexstock1log cc.v2x_polyarchyV8##c.v2x_polyarchyV8 Fariss_Maddison_gdppc_1990_ln i.year, fe vce(cluster country_id)
